package project.parser.ast.values;

import project.environments.Value;
import project.parser.ast.aux.Record;
import project.parser.ast.types.RecordType;
import project.parser.ast.types.Type;

public class RecordValue extends AbstractValue<Record> {
	public RecordValue(Record value) {
		super(value);
	}

	@Override
	public Type type() {
		return RecordType.createByValue(this);
	}

	@Override
	public Record asRecord() {
		return value;
	}

	public static boolean isInstance(Value value) {
		return value instanceof RecordValue;
	}
}
